# 导包
import jsonschema
# 准备被测数据
data = {
    "success": True,
    "code": 10000,
    "message": "操作成功",
    "data": None
}
# 编写schema
schema = {
    "type": "object",
    "required": ["success", "code", "message"]
}

# 调用validate 校验数据
result = jsonschema.validate(instance=data, schema=schema)
print(result)